auto merge of #541 : alexcrichton/cargo/cargo-upload, r=brson
This PR implements the plumbing necessary for uploading packages to a registry, downloading packages, depending on those packages, etc. All APIs (upload/download) are tied to the current implementation of [the registry](https://github.com/alexcrichton/cargo-registry).
Most of the design-level details in this PR are in the first commit. The later commits are largely adding tests, polishing it off, and making it work on windows.
Dependency-wise, this picks up a dependency on `curl-rust`, albeit a small fork until the upstream linkage changes are merged. Linkage details can be found [here](https://github.com/carllerche/curl-rust/pull/16). I'll probably have to do some configuration of the bots to get this to work (or hopefully not!).
r? @wycats